package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.MarketFeedback;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.wx.WxFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wx/feedback")
public class WxFeedbackController {
    @Autowired
    WxFeedbackService wxFeedbackService;
    @RequestMapping("/submit")
    public BaseRespVo submitFeedback(@RequestBody MarketFeedback marketFeedback){

        int errno = wxFeedbackService.submitFeedback(marketFeedback);
        switch (errno) {
            case 401:return BaseRespVo.error(errno,"参数不对");
        }
        return BaseRespVo.ok();
    }
}
